<?php

//require_once("dbase.php");
//require_once("../dbconf.php");

//$tbl_name="kihonteki";
//echo 'from basic.php';
//echo $GLOBALS['base_tbl'];
//global $conn_handler;
//global $db_name;
//$db_name="cloister";

function RetrSiteTitle() {
	//echo "enter";
	$tbl=$GLOBALS['base_tbl'];
	//echo $tbl;
	$conn_handler=$GLOBALS['conn_handler'];
	if (!$conn_handler) echo 'moo';
	$result=mysql_query('select info_value from '.$tbl.' where info_field="MainTitle";', $conn_handler);
	//$result=mysql_query('select * from '.$tbl.';');
	//if (!$result) echo 'nil';
	while ($row=mysql_fetch_array($result)) {
		//echo "te ni ireta";
		//echo $row['info_value'];
		$title=$row['info_value'];
		}
	return $title;
}


//if (!$conn_handler) {
//	ConnectDB();
//	if (!$conn_handler) echo "failed";
//	else {
//	SelectDB();
//	$title=RetrSiteTitle();
//	}
//}

//echo 'mui';
//echo $title;
//echo $test;

function RetrPageParams($page) {
	//echo $page;
	$result=array();
	$q=mysql_query('select * from '.$page.';', $GLOBALS['conn_handler']);
	//$result=mysql_fetch_array($q);
	//if (!$q) echo 'basic.php retrpparams failed';
	//if ($q) echo 'succeeded';
	while ($r=mysql_fetch_array($q)) {
		//echo $r[0];
		$result["$r[0]"]=$r[1];
		//echo $result['stylesheet'];
	}
	return $result;
	//echo $result[0];
	//return $result;
}

?>
